﻿<%@ Page Language="C#" AutoEventWireup="true" Title="Import &raquo; ResourceBlender" CodeFile="Import.aspx.cs" Inherits="Import" MasterPageFile="~/MasterPage.master" %>

<asp:Content ID="contentHead" ContentPlaceHolderID="head" runat="server">
    
</asp:Content>

<asp:Content ID="contentMain" ContentPlaceHolderID="cntMain" runat="server">
    <div class="niceform">
        <h1>Import</h1> 
        <asp:MultiView ID="mltImport" runat="server" ActiveViewIndex="0">
            <asp:View ID="viwNoApps" runat="server">
                <div class="breadcrumbs">
                    <asp:HyperLink ID="lnkNavHome" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender</asp:HyperLink> &gt; Import
                </div>
                <p>You must <asp:HyperLink ID="lnkAddApplication" runat="server" Text="add an application" NavigateUrl="~/Applications.aspx">add an application</asp:HyperLink> before importing resources.</p>
            </asp:View>
            <asp:View ID="viwFiles" runat="server">
                <div class="breadcrumbs">
                    <asp:HyperLink ID="lnkNavFilesHome" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender</asp:HyperLink> &gt; Import
                </div>
                <asp:Label ID="lblFilename" AssociatedControlID="uplXlsFile" runat="server" Text="File name"></asp:Label>
                <asp:FileUpload ID="uplXlsFile" runat="server" />
                <asp:Label ID="lblFiletype" AssociatedControlID="radFiletype" runat="server" Text="File type"></asp:Label>
                <div class="checks">
                    <asp:RadioButtonList ID="radFiletype" runat="server" CssClass="plain autowidth">
                        <asp:ListItem Text="Auto-detect" Value="auto" Selected="True" />
                        <asp:ListItem Text="XML Spreadsheet (exported by ResourceBlender)" Value="xml" />
                        <asp:ListItem Text="Java .properties" Value="properties" />
                        <asp:ListItem Text=".NET Managed Resources (.resx)" Value="resx" />
                    </asp:RadioButtonList>
                </div>
                <div class="actions">
                    <asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Upload" />
                </div>
            </asp:View>
            <asp:View ID="viwApp" runat="server">
                <div class="breadcrumbs">
                    <asp:HyperLink ID="lnkNavAppHome" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender</asp:HyperLink> &gt; <asp:HyperLink ID="lnkNavAppDone" runat="server" NavigateUrl="~/Import.aspx">Import</asp:HyperLink>  &gt; Choose Application
                </div>
                <asp:Label ID="lblInitialResults" runat="server" Text="" CssClass="block"></asp:Label>
                <asp:Panel ID="pnlInitialWarnings" runat="server" CssClass="errorDiv" Visible="False" style="text-align: left">
                    <h2>Warnings</h2>
                    <p>Import warnings:</p>
                    <asp:BulletedList ID="lstInitialWarnings" runat="server">
                    </asp:BulletedList>
                </asp:Panel>
                <p>Choose an application to which to add these bundles.</p>
                <label class="block">Application</label>
                <asp:RadioButtonList ID="radApplication" runat="server" RepeatLayout="Flow" 
                    CssClass="checks applicationChecks plain"></asp:RadioButtonList>
                <div class="clear"></div>
                <asp:RequiredFieldValidator ID="vldApplication" runat="server" 
                       ErrorMessage="You must select an application" 
                       ControlToValidate="radApplication" 
                       CssClass="error" 
                       Display="Dynamic" />
                <div class="actions">
                    <asp:Button ID="btnImport" runat="server" OnClick="btnImport_Click" Text="Import" />
                </div>
            </asp:View>
            <asp:View ID="viwFinished" runat="server">
                <div class="breadcrumbs">
                    <asp:HyperLink ID="lnkNavDoneHome" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender</asp:HyperLink> &gt; <asp:HyperLink ID="lnkNavDoneImport" runat="server" NavigateUrl="~/Import.aspx">Import</asp:HyperLink> &gt; Finished
                </div>
                <asp:Panel ID="resultDiv" runat="server" CssClass="successDiv" Visible="False" style="text-align: left">
                    <h2>Success!</h2>
                    <asp:Label ID="lblSuccessInfo" runat="server" Text=""></asp:Label>
                </asp:Panel>
                <asp:Panel ID="errorDiv" runat="server" CssClass="errorDiv" Visible="False" style="text-align: left">
                    <h2>Errors</h2>
                    <p>Completed with errors:</p>
                    <asp:BulletedList ID="lstImportErrors" runat="server">
                    </asp:BulletedList>
                </asp:Panel>
            </asp:View>
        </asp:MultiView>
    </div>
</asp:Content>